package com.wt.mapper.impl;

import com.wt.entity.Travel;
import com.wt.mapper.IRowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class TravelRowMapper implements IRowMapper<Travel> {
    @Override
    public Travel rowMapper(ResultSet rs) throws SQLException {
        Travel travel = new Travel();
        travel.setAreaName(rs.getString("area_name"));
        travel.setAreaPrairies(rs.getString("area_prairies"));
        travel.setScenicName(rs.getString("scenic_name"));
        travel.setScenicDepict(rs.getString("scenic_depict"));
        travel.setScenicImage(rs.getString("scenic_image"));
        travel.setScenicScore(rs.getDouble("scenic_score"));
        return travel;
    }
}
